package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"luck/api/internal/config"
	"luck/luckrpc/luckrpcclient"
)

type ServiceContext struct {
	Config  config.Config
	LuckRpc luckrpcclient.Luckrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		LuckRpc: luckrpcclient.NewLuckrpc(zrpc.MustNewClient(c.LuckRpc)),
	}
}
